home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 684 / 684.xpi / chrome / fireftp.jar / content / password.xul < prev    next >
Extensible Markup Language  |  2006-08-28  |  2KB  |  60 lines

  1. <?xml version="1.0"?>
  2.  
  3. <?xml-stylesheet href="chrome://global/skin/global.css"   type="text/css"?>
  4. <?xml-stylesheet href="chrome://fireftp/skin/fireftp.css" type="text/css"?>
  5.  
  6. <!DOCTYPE dialog SYSTEM "chrome://fireftp/locale/password.dtd">
  7. <dialog id             = "passwordPrompt"
  8.         title          = "&title;"
  9.         width          = "275"
  10.         height         = "190"
  11.         xmlns          = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  12.         persist        = "screenX screenY width height"
  13.         onload         = "init(event)"
  14.         buttons        = "accept, cancel"
  15.         ondialogaccept = "doOK()">
  16.  
  17.   <script type="application/x-javascript" src="chrome://fireftp/content/js/etc/common.js"/>
  18.   <script>
  19.     <![CDATA[
  20.       function init(aEvent) {
  21.         $('login').value    = window.arguments[0].login;
  22.         $('password').value = window.arguments[0].password;
  23.  
  24.         if (!window.arguments[0].login) {
  25.           $('login').focus();
  26.         } else {
  27.           $('password').focus();
  28.         }
  29.       }
  30.  
  31.       function anonymousChange() {
  32.         var anonymous          = $('anonymous').checked;
  33.         $('login').disabled    = anonymous;
  34.         $('password').disabled = anonymous;
  35.         $('login').value       = anonymous ? "anonymous"           : "";
  36.         $('password').value    = anonymous ? "fireftp@example.com" : "";
  37.       }
  38.  
  39.       function doOK() {
  40.         window.arguments[0].login     = $('login').value;
  41.         window.arguments[0].password  = $('password').value;
  42.         window.arguments[0].returnVal = true;
  43.         return true;
  44.       }
  45.     ]]>
  46.   </script>
  47.  
  48.   <label value="&enterLogin;"    accesskey="&login.access;"    control="login"/>
  49.   <textbox id="login"    width="200"/>
  50.  
  51.   <label value="&enterPassword;" accesskey="&password.access;" control="password"/>
  52.   <textbox id="password" width="200" type="password"/>
  53.  
  54.   <hbox>
  55.     <spacer flex="1"/>
  56.     <checkbox id="anonymous" label="&anonymous;" accesskey="&anonymous.access;" oncommand="anonymousChange()"/>
  57.   </hbox>
  58.  
  59. </dialog>
  60.